/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
 * Nihongo
 * Copyright (C) Massimiliano Maniscalco 2011, 2012 <massi.neptune@yahoo.com>
 * 
 * Nihongo is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Nihongo is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "result_controller.h"

void ResultController::
init_result_controller ( Glib::RefPtr<Gtk::Builder> _bldr )
{
	_bldr->get_widget ( "resultWin", _resultWin );
	_bldr->get_widget ("resultTreeView", _resultList);
	_bldr->get_widget ("resultCloseButton", _closeButton);
}

void ResultController::
connect_signals ( void )
{
	_closeButton->signal_clicked ().connect (sigc::mem_fun (this, &ResultController::on_close_button_clicked) );
}

void ResultController::
on_close_button_clicked ( void )
{
	_resultWin->hide ();
	window_closed.emit ();
}

ResultController::Type_signal_window_closed ResultController::
signal_window_closed ( void )
{
	return window_closed;
}
